/**
 * 
 */
package com.example.manager.entity;

import java.util.List;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

/**
 * @author 17790
 * 指开设的课程，包括课程及教课老师，学年学期
 *
 */
@JsonIgnoreProperties(value = { "hibernateLazyInitializer"})
@Entity
public class CourseTeaching {
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Integer id;
	@ManyToOne
	private Course course;
	@ManyToOne
	private Teacher teacher;
	private Short year;
	private Semester semester;
	@OneToMany(mappedBy="courseTeaching")
	private List<ScoreComposition> composition;
	
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public Course getCourse() {
		return course;
	}
	public void setCourse(Course course) {
		this.course = course;
	}
	public Teacher getTeacher() {
		return teacher;
	}
	public void setTeacher(Teacher teacher) {
		this.teacher = teacher;
	}
	public Short getYear() {
		return year;
	}
	public void setYear(Short year) {
		this.year = year;
	}
	public Semester getSemester() {
		return semester;
	}
	public void setSemester(Semester semester) {
		this.semester = semester;
	}
	public List<ScoreComposition> getComposition() {
		return composition;
	}
	public void setComposition(List<ScoreComposition> composition) {
		this.composition = composition;
	}
	
}
